﻿function ctlProduct_Tab_load(ctlID) { }
function ctlProduct_Tab_btn_onClick(ctlID, tabSelected) {
    
    var txtTabSelected = document.getElementById(ctlID + '_txtTabSelected');

    var tabGioiThieuChung = document.getElementById(ctlID + '_tbGioiThieuChung');
    var tabDungThu = document.getElementById(ctlID + '_tbDungThu');
    var tabLienHe = document.getElementById(ctlID + '_tbLienHeSP');
    var divGioiThieuChung = document.getElementById(ctlID + '_divGioiThieuChung');
    var divDungThu = document.getElementById(ctlID + '_divDungThu');
    var divLienHeSP = document.getElementById(ctlID + '_divLienHeSP');
    
    if (parseInt(txtTabSelected.value) == tabSelected) {
        return null;
    }
    if (typeof tabSelected == "undefined") {
        tabSelected = parseInt(txtTabSelected.value);
    }
    switch (tabSelected) {
        case 0: //"RaoBan":
            divGioiThieuChung.style.display = '';
            divDungThu.style.display = 'none';
            divLienHeSP.style.display = 'none';
            tabGioiThieuChung.className = "active-2";
            tabDungThu.className = "unactive";
            tabLienHe.className = "unactive";
            break;

        case 1: //"ChoThue":
            divGioiThieuChung.style.display = 'none';
            divDungThu.style.display = '';
            divLienHeSP.style.display = 'none';
            tabGioiThieuChung.className = "unactive";
            tabDungThu.className = "active";
            tabLienHe.className = "unactive";
            break;
        case 2: //"ChoThue":
            divGioiThieuChung.style.display = 'none';
            divDungThu.style.display = 'none';
            divLienHeSP.style.display = '';
            tabGioiThieuChung.className = "unactive";
            tabDungThu.className = "unactive";
            tabLienHe.className = "active";
            break;
    }
    txtTabSelected.value = tabSelected;
    return false;
}